<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<form action="<?php echo url_for('subcontract/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
  <table>
    <tfoot>
      <tr>
        <td colspan="2">
          <?php echo $form->renderHiddenFields(false) ?>

          <input type="submit" value="Save" />
        </td>
      </tr>
    </tfoot>
    <tbody>
      <?php echo $form->renderGlobalErrors() ?>
      <tr>
        <th><?php echo $form['plant']->renderLabel() ?></th>
        <td>
          <?php echo $form['plant']->renderError() ?>
          <?php echo $form['plant'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['supplier']->renderLabel() ?></th>
        <td>
          <?php echo $form['supplier']->renderError() ?>
          <?php echo $form['supplier'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['type']->renderLabel() ?></th>
        <td>
          <?php echo $form['type']->renderError() ?>
          <?php echo $form['type'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['fee']->renderLabel() ?></th>
        <td>
          <?php echo $form['fee']->renderError() ?>
          <?php echo $form['fee'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['start']->renderLabel() ?></th>
        <td>
          <?php echo $form['start']->renderError() ?>
          <?php echo $form['start'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['end']->renderLabel() ?></th>
        <td>
          <?php echo $form['end']->renderError() ?>
          <?php echo $form['end'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['note']->renderLabel() ?></th>
        <td>
          <?php echo $form['note']->renderError() ?>
          <?php echo $form['note'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['name']->renderLabel() ?></th>
        <td>
          <?php echo $form['name']->renderError() ?>
          <?php echo $form['name'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['status']->renderLabel() ?></th>
        <td>
          <?php echo $form['status']->renderError() ?>
          <?php echo $form['status'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['payments']->renderLabel() ?></th>
        <td>
          <?php echo $form['payments']->renderError() ?>
          <?php echo $form['payments'] ?>
        </td>
      </tr>
    </tbody>
  </table>
</form>
